home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / 3d & render tools / irit / man / man6 / srinter.6 < prev    next >
Text File  |  1996-07-16  |  2KB  |  44 lines

  1. .TH SRINTER
  2.  6 "IRIT Version 6.0" 
  3. .SH NAME
  4. SRINTER
  5.  
  6.  
  7.  
  8.  PointType SRINTER( SurfaceType Srf, PointType RayOrigin,
  9.                     VectorType RayDirection )
  10.  
  11. Computes the first intersection, if any, of the prescribed ray originating
  12. from RayOrigin in direction RayDirection with surface Srf.
  13. Returns the intersection point in the parametric space of Srf with
  14. the U and V coordinates as the X and Y coefficients of the returned value.
  15. The intersection is computed between the ray and a polygonal approximation
  16. of the surface Srf as set via the RESOLUTION variable.
  17.  
  18. Example:
  19.  
  20.     RayOrigin = point( 2, 0.1, 0.3 );
  21.     RayDir = vector( -4, 0, 0 );
  22.  
  23.     RayLine = coerce( RayOrigin, E3 ) + coerce( RayOrigin + RayDir, E3 );
  24.     color( RayLine, magenta );
  25.     attrib( RayLine, "dwidth", 2 );
  26.  
  27.     resolution = 5;
  28.     InterPt = SRINTER( glass, RayOrigin, RayDir );
  29.     InterPtE3 = seval( glass, coord( InterPt, 0 ), coord( InterPt, 1 ) );
  30.     color( InterPtE3, cyan );
  31.     attrib( InterPtE3, "dwidth", 3 );
  32.     view( list( InterPtE3, RayLine, glass, axes ), 1 );
  33.  
  34.     resolution = 80;
  35.     InterPt = SRINTER( glass, RayOrigin, RayDir );
  36.     InterPtE3 = seval( glass, coord( InterPt, 0 ), coord( InterPt, 1 ) );
  37.     color( InterPtE3, cyan );
  38.     attrib( InterPtE3, "dwidth", 3 );
  39.     view( list( InterPtE3, RayLine, glass, axes ), 1 );
  40.  
  41. A complete example of constructing a ray and intersecting it against a
  42. surface of a glass at two different resolution, resulting in two different
  43. accuracies. See also RESOLUTION.
  44.